Method and apparatus for color quantization of images employing a dynamic color map

ABSTRACT

A method and apparatus for color quantization of an image employs a dynamic color map. Pixels of a first image are mapped into corresponding color space regions while incrementing counts in records of those color space regions. Associated colors of color space regions having largest non-zero counts are included in a color map. If the number of such associated colors is less than a maximum number of color indexes of the color map, the unassigned color indexes are reserved for later assignment. Pixels of subsequent images are also mapped into corresponding color space regions while incrementing counts in records of those color space regions. If unassigned color indexes are available in the color map, associated colors of these color space regions are added to the color map until all color indexes have been assigned.

FIELD OF THE INVENTION

The present invention generally relates to techniques for thecompression of computer images and in particular, to a method andapparatus for color quantization of images employing a dynamic colormap.

BACKGROUND OF THE INVENTION

When transmitting a sequence of related images, it is useful to minimizethe amount of information being transmitted using compression and/orother techniques in order to minimize bandwidth requirements and anyundesired delay in rendering the images on a remote display. One suchtechnique is color quantization. This technique employs a color map toreduce the amount of information being transmitted for each pixel. Forexample, instead of transmitting a “true color” 24-bit value for eachpixel, an 8-bit color map index value is transmitted. In such case, athree to one reduction in transmitted bits is accomplished albeit at theexpense of having far fewer colors available in the palette.

In many applications, such reduction in available colors is anacceptable trade-off for an increased image transfer rate. However, inother applications, it may result in objectionably diminished imagequality. A fixed color map in such cases particularly aggravates theproblem.

OBJECTS AND SUMMARY OF THE INVENTION

Accordingly, it is an object of the present invention to provide amethod for color quantization of images employing a dynamic color map.

Another object is to provide an apparatus for color quantization ofimages employing a dynamic color map.

Another object is to provide a method for generating a dynamic color mapfor color quantization of images.

Still another object is provide an apparatus for generating a dynamiccolor map for color quantization of images.

These and additional objects are accomplished by the various aspects ofthe present invention, wherein briefly stated, one aspect is a methodfor color quantization of an image, comprising: mapping pixels of animage into corresponding color space regions; determining whether thecorresponding color space regions are linked to a color map; and ifindividual of the corresponding color space regions are not linked tothe color map, then linking them to the color map where color maplinkages are available, or determining color space regions that arelinked to the color map and having associated colors closest to colorsof the pixels of the individual of the corresponding color space regionswhere color map linkages are not available.

In another aspect, an apparatus for color quantization of an image,comprises at least one circuit that is configured to: map pixels of animage into corresponding color space regions; determine whether thecorresponding color space regions are linked to a color map; and ifindividual of the corresponding color space regions are not linked tothe color map, then link the individual of the corresponding color spaceregions to the color map where color map linkages are available, ordetermine color space regions that are linked to the color map andhaving associated colors closest to colors of the pixels of theindividual of the corresponding color space regions where color maplinkages are not available.

In another aspect, a method for generating a dynamic color map for colorquantization of images, comprises: mapping each pixel of an image intoone of a plurality of color space regions; generating a count of pixelsmapped into each of the plurality of color space regions; and generatinga dynamic color map by including associated colors of color spaceregions having largest non-zero of such generated counts up to a maximumnumber that is less than or equal to a number of the plurality of colorspace regions.

In still another aspect, an apparatus for generating a dynamic color mapfor color quantization of images, comprises at least one circuit that isconfigured to: map each pixel of an image into one of a plurality ofcolor space regions; generate a count of pixels mapped into each of theplurality of color space regions; and generate a dynamic color map byincluding associated colors of color space regions having largestnon-zero of such generated counts up to a maximum number that is lessthan a number of the plurality of color space regions.

In yet another aspect, an apparatus for generating a dynamic color mapfor color quantization of images, comprises: means for associating eachpixel of an image with a corresponding one of a plurality of colorspaces; means for generating a count of such pixels for individual ofthe plurality of color spaces; and means for generating a dynamic colormap by including color spaces having largest and non-zero of such countsup to a maximum number of color spaces.

Additional objects, features and advantages of the various aspects ofthe present invention will become apparent from the followingdescription of its preferred embodiment, which description should betaken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a block diagram of a computer system for transmittingimages, utilizing aspects of the present invention.

FIG. 2 illustrates a flow diagram of a method for generating a colormap, utilizing aspects of the present invention.

FIG. 3 illustrates a flow diagram of a method for generating acolor-mapped image, utilizing aspects of the present invention.

FIG. 4 illustrates a flow diagram of a method for transmitting images,utilizing aspects of the present invention.

FIG. 5 illustrates an RGB color coordinate system for specifying pixelcolors.

FIG. 6 illustrates a table of color depth in bits/pixel, and the numberof available colors resulting from such depth.

FIG. 7 illustrates color information for a pixel having a 24-bit colordepth comprising 8 bits of red, 8 bits of green and 8 bits of blue.

FIG. 8 illustrates an RGB color space divided up into uniformly sizedcolor space regions.

FIG. 9 illustrates an RGB color space divided up into non-uniformlysized color space regions.

FIG. 10 illustrates a record for a color space region, utilizing aspectsof the present invention.

FIG. 11 illustrates a color map generated by a color map generatorutilizing aspects of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 illustrates, as an example, a block diagram of a system in whicha server computer 101 generates and transmits information of a sequenceof related images to a client computer 102 over a communication mediumsuch as the Internet 103. The server computer 101 has a conventionalmemory system 110 including at least one mass storage unit such as ahard disk drive, and system memory such as dynamic random access orother solid-state memory. The client computer 102 also has aconventional memory system 120 that is similarly constructed.

An application program 111 residing in the memory system 110 generatesthe sequence of related images. The images in this case are referred toas being related to one another, such as frames in video or animation,since each image is often only partially different than its immediatelypreceding or succeeding image in the sequence. At least two successiveimages are stored in image files 112. One image is referred to as beingan old image whose information has already been transmitted to theclient computer 102. Another image is referred to as being a new imagewhose information is to be transmitted next to the client computer 102.

A color map generator 113 residing as a program in the memory system 110generates a dynamic color map 114 from the sequence of images according,for example, to the methods described in reference to FIGS. 2-4. Thecolor map is referred to as being a dynamic color map, because it may beadded to according to FIG. 3 or regenerated according to FIG. 4, ascolors of the images change during the sequence.

A color quantization generator 115 also residing as a program in thememory system 110 generates color-mapped image files 116 from thedynamic color map 114 and the sequence of images according, for example,to the method described in reference to FIG. 3. By mapping each pixel ofan image into a corresponding color space region linked to the colormap, the amount of image information to be transmitted is considerablyreduced. For example, where each pixel is originally defined by a 24-bitcolor depth, and the maximum number of color space regions linked to thecolor map is 256, the amount of information to be transmitted is reducedby 3 times since each of the up to 256 color space regions is identifiedby an 8-bit color map index as depicted, for example, by the color mapillustrated in FIG. 11.

An update program 117 also residing in the memory system 110 furtherreduces the amount of information to be transmitted according, forexample, to the method described in reference to FIG. 4. An example ofsuch an update program is described in U.S. patent application Ser. No.09/940,098 entitled “Method and Apparatus for Transmitting Image UpdatesEmploying High Compression Encoding” filed Aug. 27, 2001, assigned tothe same Assignee as the present invention, and incorporated in fullinto this specification by this reference.

A compression program 118 also residing in the memory system 110 encodesand compresses the output of the update program 117 to form at least onecompressed file 119, using a conventional loss-less compressed dataformat such as ZLIB. Other suitable formats include the graphicsinterchange format (GIF), and the joint photographic experts groupformat (JPEG). JPEG, however, is generally not a preferred format forthis application, because it is a lossy compression technique.

The server computer 101 then transmits the compressed file 119 to theclient computer 102 through the communication medium 103. Although theInternet is shown as the preferred communication medium in this example,it is to be appreciated that the scope of the present invention is notto be so limited.

A decompression program 121 residing in the memory system 120 of theclient computer 102 receives, decodes, and decompresses the compressedfile 119 to recover information of the color-mapped image files 116. Thedecompression program 121 in this case is complementary to thecompression program 118 to facilitate its decoding and decompression.The information recovered is essentially the information that wasprovided for transmission by the update program 117 as described inreference to FIG. 4.

An image rendering program 122 also residing in the memory system 120renders the new image on the display of client computer 102 from theinformation recovered by the decompression program 121 and ifappropriate, also from the information of the old image and existingcolor map stored in memory system 120. The information of the old imageand existing color map are used when the update program 117 transmitsimage update information only instead of complete information for a newimage. In this case, color map additions may be added to the existingcolor map to also update the color map. On the other hand, when theupdate program 117 transmits complete information for a new image, italso generally transmits a newly generated color map. In that case,information of the old image and existing color map are not necessaryand consequently, are not used.

Although the apparatus for generating a dynamic color map for colorquantization of computer images is described as being the programmedserver computer 101 in this example, it is to be appreciated that theapparatus may take many forms including in its most basic form, at leastone circuit that is configured to perform the described functions of theprogrammed server computer 101. The at least one circuit may also takemany forms contemplated to be within the full scope of the presentinvention, including hardwired logic, or the use of one or moreprocessors programmed by software or firmware to perform the describedfunctions of the programmed server computer 101.

FIG. 2 illustrates, as an example, a flow diagram of a method forgenerating a dynamic color map that may be implemented by the color mapgenerator 113. In 201, a pointer is initialized to a first pixelposition in a buffer storing a new image in the image files 112. Forconvenience, this buffer is referred to as the new image buffer. In 202,the pointer is checked to see if it is pointing to a pixel position thatis less than the last pixel position in the new image buffer.

If the answer in 202 is YES, then in 203, the method reads the RGB colorvalue for that pixel. As is well known, in the RGB color model, colorsare arranged in a 3-dimensional color space with red, green and blueaxes as depicted, for example, in FIG. 5, for a pixel having red, greenand blue components R1, G1 and B1. The color depth of the componentsdetermines the number of shades of red, green and blue that a pixelmight have. For example, a color depth of 24-bits as shown in FIG. 6defines 16,777,216 colors. Such high resolution is commonly referred toas being true color. An example of such a 24-bit true color pixel isshown in FIG. 7 where the 24-bits are divided up into 8-bits of red,8-bits of green and 8-bits of blue. On the other hand, a color depth of8-bits only defines 256 colors. Such limited resolution is commonlyreferred to as being pseudo color, and commonly employs a color map. Inthe color map, two adjacent color indexes are not necessarily similarcolors. For example, color index 7 may be totally different than colorindex 8 depending on the color map. To find out if two colors aresimilar, it is necessary to calculate the distance of the true colorvalues in the color space.

In 204, the method maps the pixel into one of a number of predefinedcolor space regions in the 3-dimensional RGB color space. For example,the predefined color space regions may be uniformly sized with eightsegments defined on the red axis, eight segments defined on the greenaxis and eight segments defined on the blue axis using a linear scale asdepicted in FIG. 8. On the other hand, the predefined color spaceregions may be non-uniformly sized with the eight segments on the red,green and blue axes defined on a non-linear scale such as thelogarithmic scale depicted in FIG. 9.

Preferably, the number of predefined color space regions is greater thanthe number of color indexes in the color map 114 so that only a subsetof the predefined color space regions may be linked to the color map 114at a given time. For example, by dividing the color space into eightsegments on each of the red, green and blue axes, a total of 512 colorspace regions are defined. This is in contrast to an 8-bit color map,where there are only 256 color indexes available. In such case, only amaximum of 256 of the 512 color space regions may be linked to the colormap at one time.

To map a pixel into one of the color space regions, the RGB components(R1, G1, B1) of the pixel must fall within a cube defined by its segmentcoordinates. Assuming that the color space regions have been defined soas to cover all possible pixels, then each pixel will fall into one ofthe color space regions.

In 205, after determining that a pixel maps into a particular colorspace region, a record containing certain information of that colorspace region is updated. An example of such a record is depicted in FIG.10. In the example, a first field identifies the color space region by acolor space number, which in this example would be one out of 512. Asecond field indicates a count of pixels mapped into that color spaceregion. Third, fourth and fifth fields respectively indicate the sums ofred, green and blue components of pixels mapped into the color spaceregion. A sixth field indicates whether the color space region is beingused in or linked to the current color map, and a seventh fieldindicates the color map index number if the color space region is beingused in or linked to the current color map. Updating the record in thiscase would involve incrementing the count by one, and adding the pixel'sred, green and blue components respectively to the numbers stored in thered, green and blue sum fields.

In 206, the method updates a list containing the color space regionsordered by their count values. In 207, the pointer is incremented, andthe method jumps back to 202 to process the next pixel in the image, orgenerate the color map if processing of the image's pixels is completed.

If the answer in 202 is NO, indicating that processing of the imagepixels is completed, then in 208, the method now generates the color map114 by including associated colors from the highest count color spaceregions according to the list generated and updated in 206, up to amaximum number of color map indexes. In addition, the records of thosecolor space regions are updated to indicate that they are being linkedto the color map through their associated colors, as well as indicatingthe color map index that has been assigned to the associated color ofthat color space region. For example, each of the color space regionshas an associated color having red, blue and green components equal tothe average of the red, green and blue components of pixels mapped intothe color space region. These averages are easily computed from therecord of the color space region by dividing the red, blue and greensums stored in the record by the count also stored in the record.

In 209, if the number of color space regions having non-zero counts isless than the maximum number of color map indexes, then in 210, theremainder of unassigned color map indexes are reserved for subsequentimages in the sequence of images, and the method proceeds to 211 togenerate the color map. The unassigned color map indexes would then beavailable for assignment during the processing of subsequent images asdescribed in reference to FIG. 3. On the other hand, if the number ofcolor space regions having non-zero counts is greater than or equal tothe maximum number of color map indexes, then the method proceedsdirectly to 211 to generate the color map since there are no unassignedcolor map indexes in that case.

FIG. 3 illustrates a flow diagram of a method for generatingcolor-mapped images that may be implemented by the color quantizationgenerator 115. In 301, the pointer is again initialized to a first pixelposition in the new image buffer. In 302, the pointer is checked to seeif it is pointing to a pixel position that is less than the last pixelposition in the new image buffer.

If the answer in 302 is YES, then in 303, the method reads the RGB colorvalue for that pixel. In 304, the method then maps the pixel into one ofthe predefined color space regions in the 3-dimensional RGB color space.In 305, the method then reads the record for that color space region. In306, if the record indicates that the color space region is linked tothe color map, then in 307, it writes the color map index indicated inthe record to an output buffer included in the color-mapped image files116 along with information of the pixel currently being processed. Themethod then proceeds to 312 where the pointer is incremented, and thento 302 to process a next pixel in the image.

On the other hand, if the record indicates that the color space regionis not linked to the color map, then in 308, the method checks to see ifthere are any unassigned color map indexes available. If the answer to308 is YES, then in 309, the method updates the record for the colorspace region as described in reference to 205 of FIG. 2, and in 310, themethod links the color space region to the color map as described inreference to 208˜211 of FIG. 2, and optionally, updates the listcontaining the color space regions ordered by their count values asdescribed in reference to 206 in FIG. 2. The method then goes to 307,and writes the color map index indicated in the record to the outputbuffer included in the color-mapped image files 116 along withinformation of the pixel currently being processed. The method thenproceeds to 312 where the pointer is incremented, and then to 302 toprocess a next pixel in the image.

If the answer to 308 is NO, however, then in 311, the method finds theclosest associated color in the color map to the color of the pixelbeing processed. The closest color is then determined by calculatingEuclidean distances from the pixel color represented as a vector in3-dimensional RGB color space to each of the associated colors in thecolor map. The method then goes to 307, and writes the color map indexassigned to the associated color that is closest to the pixel's color inthe color map, to the output buffer included in the color-mapped imagefiles 116 along with information of the pixel currently being processed.Optionally, the method may also update the color space region recordcorresponding to the pixel by setting its “use” field and including thecolor map index of the closest associated color in its “index#” field sothat a subsequent pixel falling into that color space region may avoidperforming 308˜311, thus speeding up its processing time albeit at theexpense of perhaps a less accurate color match for that subsequentpixel. The method then proceeds to 312 where the pointer is incremented,and then to 302 to process a next pixel in the image.

FIG. 4 illustrates a flow diagram of a method for transmitting asequence of related images that may be performed by the update program117 as described in reference to FIG. 1. To minimize the amount ofinformation to be sent, the method only sends updates to previouslytransmitted images as long as differences between sequential imagesremain within a predetermined threshold. For example, the predeterminedthreshold may be an acceptable correlation factor computed between twosuccessive images. In such case, as long as a new image correlatesclosely to an old image, only updates (i.e., information on thedifferences between the new and old images) are sent. On the hand, whenthere is very little correlation between the new and old images, thencomplete information on the new image is sent along with a newlygenerated color map.

Accordingly, in 401, the method first compares the new and old images insome predetermined fashion. In 402, the difference between thesequential images is then compared against a predetermined threshold. Ifthe difference is determined to be greater than or equal to thepredetermined threshold, then in 403, the method generates a new colormap for the new image as described, for example, in reference to FIG. 2.In 404, the method then generates the color-mapped image of the newimage as described, for example, in reference to FIG. 3. In 405 and 406,the method then provides the new color map and color-mapped image fortransmission. The method then proceeds to 401, to process the next imagein a sequence of images.

On the other hand, if the difference is determined in 402 to be lessthan the predetermined threshold, then in 407, the method generates acolor-mapped image update by generating a color-mapped image of the newimage as described, for example, in reference to FIG. 3, comparing thecolor-mapped new image with the color-mapped old image, and recordingthe differences between the color-mapped new and old images. Then, in408, the method determines whether or not a new color had been added tothe color map such as described in reference to 308˜311 in FIG. 3. If anew color had been added, then in 409, information to update the oldcolor map to include the new color is provided for transmission, and in410, the color-mapped image update information to update the old imageto generate the new image is provided for transmission. The method thenproceeds to 401, to process the next image in a sequence of images.

In certain applications, where it is known beforehand that the sequenceof images will be changing over time, 403˜406 may simply be performedfrom time to time such as every 30 seconds or so, while between suchtimes, 407˜410 are performed on the sequence of images. In this case,401 and 402 are not performed, thereby speeding up the processing of thesequence of images.

Although the various aspects of the present invention have beendescribed with respect to a preferred embodiment, it will be understoodthat the invention is entitled to full protection within the full scopeof the appended claims.

1. A method for color quantization of an image, comprising: mappingpixels of an image into corresponding color space regions; determiningwhether said corresponding color space regions are linked to a colormap; and if individual of said corresponding color space regions are notlinked to said color map, then linking said individual of saidcorresponding color space regions to said color map where color maplinkages are available, or determining color space regions that arelinked to said color map and having associated colors closest to colorsof the pixels of said individual of said corresponding color spaceregions where color map linkages are not available.
 2. The methodaccording to claim 1, wherein said mapping pixels of an image intocorresponding color space regions, comprises: defining a plurality ofcolor space regions in a 3-dimensional color space; and determiningwhich of said plurality of color space regions each pixel of said imagemaps according to a color of said pixel.
 3. The method according toclaim 2, wherein said plurality of color space regions is formed bysegmenting each axis of said 3-dimensional color space into a pluralityof segments.
 4. The method according to claim 3, wherein said3-dimensional color space has a red axis segmented into eight segments,a green axis segmented into eight segments and a blue axis segmentedinto eight segments so that a number of said plurality of color spaceregions is
 512. 5. The method according to claim 4, wherein saidplurality of color space regions are uniformly sized.
 6. The methodaccording to claim 4, wherein said plurality of color space regions arenon-uniformly sized.
 7. The method according to claim 1, wherein saiddetermining whether said corresponding color space regions are linked toa color map, comprises: reading records associated with saidcorresponding color space regions; and determining whether saidcorresponding color space regions are linked to said color map by a useindication in said records.
 8. The method according to claim 1, whereinsaid linking said individual of said corresponding color space regionsto said color map where color map linkages are available, comprises:determining whether color map linkages are available for said color map;and updating records of said individual of said corresponding colorspace regions so as to indicate that they are linked to said color mapuntil either all of said records have been so updated or no more colormap linkages are available.
 9. The method according to claim 1, whereinsaid determining color space regions that are linked to said color mapand having associated colors closest to colors of the pixels of saidindividual of said corresponding color space regions where color maplinkages are not available, comprises: determining associated colors forcolor space regions linked to said color map; and determining which ofsaid associated colors for color space regions linked to said color mapare closest to the colors of the pixels of said individual of saidcorresponding color space regions.
 10. The method according to claim 9,wherein said determining associated colors for color space regionslinked to said color map, comprises determining for individual of saidcolor space regions linked to said color map, an average color of pixelsmapped into the color space region.
 11. The method according to claim 1,further comprising: if individual of said corresponding color spaceregions are linked to said color map, then reading information of colormap linkages stored in records associated with such individual of saidcorresponding color space regions, and storing said information of colormap linkages along with information of the pixels of such individual ofsaid corresponding color space regions.
 12. The method according toclaim 1, wherein said linking said individual of said correspondingcolor space regions to said color map where color map linkages areavailable, further comprises reading information of color map linkagesstored in records associated with said individual of said correspondingcolor space regions, and storing said information of color map linkagesread from said records along with information of the pixels of suchindividual of said corresponding color space regions.
 13. The methodaccording to claim 1, further comprising: if individual of saidcorresponding color space regions are not linked to said color map, theninformation of color map linkages read from records of color spaceregions that are linked to said color map and having associated colorsclosest to colors of the pixels of said individual of said correspondingcolor space regions are stored along with information of such individualof said corresponding color space regions.
 14. An apparatus for colorquantization of an image, comprising at least one circuit configured to:map pixels of an image into corresponding color space regions; determinewhether said corresponding color space regions are linked to a colormap; and if individual of said corresponding color space regions are notlinked to said color map, then link said individual of saidcorresponding color space regions to said color map where color maplinkages are available, or determine color space regions that are linkedto said color map and having associated colors closest to colors of thepixels of said individual of said corresponding color space regionswhere color map linkages are not available.
 15. The apparatus accordingto claim 14, wherein said at least one circuit is further configured to:if individual of said corresponding color space regions are linked tosaid color map, then read information of color map linkages stored inrecords associated with such individual of said corresponding colorspace regions, and store said information of color map linkages alongwith information of the pixels of such individual of said correspondingcolor space regions.
 16. The apparatus according to claim 14, whereinsaid at least one circuit is further configured to: if individual ofsaid corresponding color space regions are not linked to said color map,then store information of color map linkages read from records of colorspace regions that are linked to said color map and having associatedcolors closest to colors of the pixels of said individual of saidcorresponding color space regions along with information of suchindividual of said corresponding color space regions.
 17. The apparatusaccording to claim 14, wherein said at least one circuit includes aprocessor that is configured by programming said processor.
 18. Theapparatus according to claim 14, wherein said at least one circuitincludes at least one logic circuit.
 19. A method for generating adynamic color map for color quantization of images, comprising: mappingeach pixel of an image into one of a plurality of color space regions;generating a count of pixels mapped into each of said plurality of colorspace regions; and generating a dynamic color map by includingassociated colors of color space regions having largest non-zero of suchgenerated counts up to a maximum number that is less than or equal to anumber of said plurality of color space regions.
 20. The methodaccording to claim 19, further comprising: mapping each pixel of asubsequent image into one of said plurality of color space regions;generating an updated count of pixels mapped into each of said pluralityof color space regions; and updating said dynamic color map by includingassociated colors of color space regions having largest non-zero of suchgenerated updated counts up to said maximum number, and reserving anyremainder up to said maximum number for another at least one subsequentimage.
 21. The method according to claim 20, wherein said number of saidplurality of color space regions is equal to 512, and said maximumnumber of associated colors is equal to
 256. 22. The method according toclaim 21, wherein said plurality of color space regions are organizedinto eight segments of red, eight segments of green, and eight segmentsof blue.
 23. The method according to claim 22, wherein said plurality ofcolor space regions are uniformly sized with said eight segments of red,said eight segments of green, and said eight segments of blue segmentedon a linear scale.
 24. The method according to claim 22, wherein saidplurality of color space regions are non-uniformly sized with said eightsegments of red, said eight segments of green, and said eight segmentsof blue segmented on a non-linear scale.
 25. The method according toclaim 19, further comprising: generating a sum of red values of suchpixels for individual of said plurality of color spaces; generating asum of green values of such pixels for individual of said plurality ofcolor spaces; generating a sum of blue values of such pixels forindividual of said plurality of color spaces; and generating an averagecolor of such pixels for individual of said plurality of color spaces bydividing said sum of red values by said count, said sum of green valuesby said count, and said sum of blue values by said count for saidindividual of said plurality of color spaces.
 26. An apparatus forgenerating a dynamic color map for color quantization of images,comprising at least one circuit configured to: map each pixel of animage into one of a plurality of color space regions; generate a countof pixels mapped into each of said plurality of color space regions; andgenerate a dynamic color map by including associated colors of colorspace regions having largest non-zero of such generated counts up to amaximum number that is less than a number of said plurality of colorspace regions.
 27. The apparatus according to claim 26, wherein said atleast one circuit is further configured to: map each pixel of asubsequent image into one of said plurality of color space regions;generate an updated count of pixels mapped into each of said pluralityof color space regions; and update said dynamic color map by includingassociated colors of color space regions having largest non-zero of suchgenerated updated counts up to said maximum number.
 28. The apparatusaccording to claim 27, wherein said plurality of color spaces areorganized into eight segments of red, eight segments of green, and eightsegments of blue.
 29. The apparatus according to claim 28, wherein saidmaximum number of color spaces equals
 256. 30. The apparatus accordingto claim 28, wherein said plurality of color spaces are uniformly sizedwith said eight segments of red, said eight segments of green, and saideight segments of blue segmented on a linear scale.
 31. The apparatusaccording to claim 28, wherein said plurality of color spaces arenon-uniformly sized with said eight segments of red, said eight segmentsof green, and said eight segments of blue segmented on a non-linearscale.
 32. The apparatus according to claim 26, wherein said at leastone circuit is further configured to: generate a sum of red values ofsuch pixels for individual of said plurality of color spaces; generate asum of green values of such pixels for individual of said plurality ofcolor spaces; generate a sum of blue values of such pixels forindividual of said plurality of color spaces; and generate an averagecolor of such pixels for individual of said plurality of color spaces bydividing said sum of red values by said count, said sum of green valuesby said count, and said sum of blue values by said count for saidindividual of said plurality of color spaces.
 33. The apparatusaccording to claim 26, wherein said at least one circuit is a processorconfigured by being programmed.
 34. The apparatus according to claim 26,wherein said at least one circuit comprises logic circuitry.
 35. Anapparatus for generating a dynamic color map for color quantization ofimages, comprising: means for associating each pixel of an image with acorresponding one of a plurality of color spaces; means for generating acount of such pixels for individual of said plurality of color spaces;and means for generating a dynamic color map by including color spaceshaving largest and non-zero of such counts up to a maximum number ofcolor spaces, and reserving a first remainder of said maximum number ofcolor spaces for at least a second image.
 36. The apparatus according toclaim 35, further comprising: means for associating each pixel of saidsecond image with a corresponding one of said plurality of color spaces;means for generating an updated count of such pixels for individual ofsaid plurality of color spaces; and means for generating an updateddynamic color map by including color spaces having largest and non-zeroof such updated counts up to said maximum number of color spaces. 37.The apparatus according to claim 36, wherein said plurality of colorspaces are organized into eight segments of red, eight segments ofgreen, and eight segments of blue.
 38. The apparatus according to claim37, wherein said maximum number of color spaces equals 256.